From 56e87c70cf37b39b27c0dc2d1c5963679630d993 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Kol=C3=A5s?= Date: Mon, 9 Oct 2006 13:40:41 +0000 Subject: [PATCH] Cleaned up the typedef for Babl, fixes issues with g++. --- ChangeLog | 10 ++++++++++ babl/babl-classes.h | 13 +++++++------ babl/babl-conversion.c | 4 ++-- babl/babl-fish-path.c | 4 ++-- babl/babl-fish-reference.c | 4 ++-- babl/babl-fish-simple.c | 4 ++-- 6 files changed, 25 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0727357..6c24381 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2006-10-09 Øyvind Kolås + + Cleaned up the typedef for Babl, fixes issues with g++. + + * babl/babl-classes.h: + * babl/babl-conversion.c: (conversion_new): + * babl/babl-fish-path.c: (babl_fish_path): + * babl/babl-fish-reference.c: (babl_fish_reference): + * babl/babl-fish-simple.c: (babl_fish_simple): + 2006-09-26 Dominik Ernst * babl/babl-classes.h: fixed an issue with g++ diff --git a/babl/babl-classes.h b/babl/babl-classes.h index e70f460..05106f3 100644 --- a/babl/babl-classes.h +++ b/babl/babl-classes.h @@ -76,6 +76,7 @@ typedef enum { } BablClassType; +typedef union _Babl Babl; /* common header for any item inserted into database */ typedef struct @@ -91,8 +92,8 @@ typedef struct typedef struct BablConversion { BablInstance instance; - union Babl *source; - union Babl *destination; + Babl *source; + Babl *destination; long cost; double error; union @@ -194,8 +195,8 @@ typedef struct typedef struct { BablInstance instance; - union Babl *source; - union Babl *destination; + Babl *source; + Babl *destination; double error; /* the amount of noise introduced by the fish */ @@ -267,7 +268,7 @@ typedef struct void (*destroy) (void); } BablExtension; -typedef union Babl +union _Babl { BablClassType class_type; BablInstance instance; @@ -283,7 +284,7 @@ typedef union Babl BablFishSimple fish_simple; BablFishPath fish_path; BablExtension extension; -} Babl; +} _Babl; #endif diff --git a/babl/babl-conversion.c b/babl/babl-conversion.c index 88ebafd..e5dd826 100644 --- a/babl/babl-conversion.c +++ b/babl/babl-conversion.c @@ -98,8 +98,8 @@ conversion_new (const char *name, } babl->instance.id = id; - babl->conversion.source = (union Babl*)source; - babl->conversion.destination = (union Babl*)destination; + babl->conversion.source = source; + babl->conversion.destination = destination; babl->conversion.error = -1.0; babl->conversion.cost = 69L; diff --git a/babl/babl-fish-path.c b/babl/babl-fish-path.c index d3e4428..3b407ca 100644 --- a/babl/babl-fish-path.c +++ b/babl/babl-fish-path.c @@ -287,8 +287,8 @@ babl_fish_path (Babl *source, babl->instance.id = 0; babl->instance.name = ((void *)babl) + sizeof(BablFishPath); strcpy (babl->instance.name, name); - babl->fish.source = (union Babl*)source; - babl->fish.destination = (union Babl*)destination; + babl->fish.source = source; + babl->fish.destination = destination; babl->fish.processings = 0; babl->fish.pixels = 0; diff --git a/babl/babl-fish-reference.c b/babl/babl-fish-reference.c index 8acaab1..a93dd85 100644 --- a/babl/babl-fish-reference.c +++ b/babl/babl-fish-reference.c @@ -64,8 +64,8 @@ babl_fish_reference (Babl *source, babl->instance.id = 0; babl->instance.name = ((void *)babl) + sizeof(BablFishReference); strcpy (babl->instance.name, name); - babl->fish.source = (union Babl*)source; - babl->fish.destination = (union Babl*)destination; + babl->fish.source = source; + babl->fish.destination = destination; babl->fish.processings = 0; babl->fish.pixels = 0; diff --git a/babl/babl-fish-simple.c b/babl/babl-fish-simple.c index 6b0fd49..deb525f 100644 --- a/babl/babl-fish-simple.c +++ b/babl/babl-fish-simple.c @@ -41,8 +41,8 @@ babl_fish_simple (BablConversion *conversion) babl->instance.id = 0; babl->instance.name = ((void *)babl) + sizeof(BablFishSimple); strcpy (babl->instance.name, name); - babl->fish.source = (union Babl*)conversion->source; - babl->fish.destination = (union Babl*)conversion->destination; + babl->fish.source = conversion->source; + babl->fish.destination = conversion->destination; babl->fish.processings = 0; babl->fish.pixels = 0; -- 2.30.2